#include <iostream>
#include <string>

int n;
std::string s;

int main()
{
	std::cin >> n;
	std::cin >> s;
	int sad = 0, happy = 0;
	for (int i = 0; i < (int)s.size(); i++) {
		if (s[i] == ':') {
			if (i - 1 >= 0) {
				if (s[i - 1] == '(') happy++;
				else if (s[i - 1] == ')') sad++;
			}
			if (i + 1 < (int)s.size()) {
				if (s[i + 1] == '(') sad++;
				else if (s[i + 1] == ')') happy++;
			}
		}
	}

	if (happy > sad) std::cout << "HAPPY\n";
	else if (happy == sad) std::cout << "BORED\n";
	else std::cout << "SAD\n";
}
